package cn.kdyzm.twofa.service.impl;

import cn.kdyzm.component.mybatis.base.BaseServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cn.kdyzm.twofa.mapper.ISysUser2faMapper;
import cn.kdyzm.twofa.entity.SysUser2fa;
import cn.kdyzm.twofa.service.ISysUser2faService;

/**
 * 两步验证相关临时配置Service业务层处理
 *
 * @author kdyzm
 * @date 2025-06-16
 */
@Service
public class SysUser2faServiceImpl extends BaseServiceImpl<ISysUser2faMapper, SysUser2fa> implements ISysUser2faService {

    @Override
    public SysUser2fa getOneByUserId(Long userId) {
        return this.getOne(new LambdaQueryWrapper<SysUser2fa>()
                .eq(SysUser2fa::getUserId, userId)
        );
    }
}
